package io.github.hadyang.leetcode.offer;

import io.github.hadyang.leetcode.TreeNode;

/** @author haoyang.shi */
public class MirrorTree {

  public void Mirror(TreeNode root) {
    if (root == null) return;

    TreeNode temp = root.left;
    root.left = root.right;
    root.right = temp;

    Mirror(root.left);
    Mirror(root.right);
  }
}
